package net.kazed.nextaction.task;

import java.util.List;

import android.content.Context;
import android.widget.ListAdapter;

public interface TaskAttachmentManager {

    /**
     * @return List of attachment types.
     */
    List<AttachmentType> getAttachmentTypes();
    
    /**
     * @param context Android context.
     * @param itemResource Resource ID of item view.
     * @return List adapter with attachment types.
     */
    ListAdapter getAttachmentTypeListAdapter(Context context, int itemResource);

    /**
     * @param index List index. 
     * @return Attachment type at index in list.
     */
    AttachmentType getAttachmentType(int index);

    /**
     * @param index List index. 
     * @return Attachment type at index in list.
     */
    AttachmentType getActiveAttachmentType(int index);

    /**
     * Get the attachment type by request code.
     * @param requestCode Request code of attachment type.
     * @return Found attachment type, null if not found.
     */
    public AttachmentType getAttachmentTypeByRequestCode(int requestCode);

}
